package com.weixing.mall.provider.model.vo.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.weixing.mall.provider.model.enums.AppointmentEunm;
import com.weixing.mall.provider.model.enums.IsPageSiteEunm;
import com.weixing.mall.provider.model.enums.IsPayEunm;
import com.weixing.mall.provider.model.enums.ads.AdvertsingEunm;
import lombok.Data;

import java.util.Date;

/**
 * @Version 1.0
 **/
@Data
public class MediaOrderRecordsED {
    @ExcelProperty("媒体分类")
    private String mediaTypeName;

    @ExcelProperty("媒体名称")
    private String platformName;

    @ExcelProperty("版面位置")
    @ExcelIgnore
    private IsPageSiteEunm pageSite;
    @ExcelProperty("版面位置")
    private String pageSiteStr;

    @ExcelProperty("标价")
    private Integer price;

    @ExcelProperty("投放日期")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date launchDate;
    @ExcelProperty("预约开始日期")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date startOrderDate;
    @ExcelProperty("预约截止日期")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")

    private Date endOrderDate;
    @ExcelProperty("是否付款")
    @ExcelIgnore
    private IsPayEunm isAgentPay;
    @ExcelProperty("是否付款")
    private String isAgentPayStr;

    @ExcelProperty("申请人")
    private String orderdAgentName;
    @ExcelProperty("申请时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date applyTime;
    @ExcelProperty("上次广告日期")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date lastAdvertDate;
    @ExcelProperty("广告状态")
    @ExcelIgnore
    private AdvertsingEunm staus;
    @ExcelProperty("广告状态")
    private String stausStr;
    @ExcelProperty("预约状态")
    @ExcelIgnore
    private AppointmentEunm recordStatus;
    @ExcelProperty("预约状态")
    private String recordStatusStr;

    private void setIsAgentPay(IsPayEunm isAgentPay){
        this.isAgentPay = isAgentPay;
        if(isAgentPay != null){
            this.isAgentPayStr = isAgentPay.getDesp();
        }
    }
    private void setStaus(AdvertsingEunm staus){
        this.staus = staus;
        if(staus != null){
            this.stausStr = staus.getDesp();
        }
    }
    private void setRecordStatus(AppointmentEunm recordStatus){
        this.recordStatus = recordStatus;
        if(recordStatus != null){
            this.recordStatusStr = recordStatus.getDesp();
        }
    }

}
